package com.lnsoft.cac;

import com.lnsoft.cac.server.CACServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Order(value = 2)
public class NettyServerRunner implements CommandLineRunner {

    @Autowired
    private CACServer cacServer;

    @Override
    public void run(String... args) throws Exception {
        log.debug("NettyServerRunner执行----------------");
        cacServer.start();
        log.debug("NettyServerRunner执行完毕----------------");
    }
}
